# a+ 表示追加并可读（文本）模式，文件不存在会创建
with open('rdtxt.txt', 'a+') as f:
	value = ('the answer', 42)
	s = str(value) # convert the tuple to string
	print(f.write(s))
